Socket
Socket
Sign inDemoInstall

glob-all

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-all

Provide multiple patterns to node-glob


Version published
Weekly downloads
384K
decreased by-3.96%
Maintainers
1
Weekly downloads
 
Created

What is glob-all?

The glob-all npm package is a utility for matching file paths using glob patterns. It extends the functionality of the standard glob package by allowing multiple patterns to be matched at once, making it easier to work with complex file matching scenarios.

What are glob-all's main functionalities?

Match multiple patterns

This feature allows you to match multiple glob patterns at once. In this example, it matches all JavaScript files in the 'src' and 'test' directories.

const globAll = require('glob-all');
globAll(['src/**/*.js', 'test/**/*.js'], (err, files) => {
  if (err) throw err;
  console.log(files);
});

Synchronous matching

This feature allows you to perform synchronous matching of multiple glob patterns. The example shows how to get all matching files synchronously.

const globAll = require('glob-all');
const files = globAll.sync(['src/**/*.js', 'test/**/*.js']);
console.log(files);

Options support

This feature allows you to pass options to the glob patterns. In this example, the 'dot' option is used to include files starting with a dot.

const globAll = require('glob-all');
globAll(['src/**/*.js', 'test/**/*.js'], { dot: true }, (err, files) => {
  if (err) throw err;
  console.log(files);
});

Other packages similar to glob-all

Keywords

FAQs

Package last updated on 01 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc